﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace _7._1
{
    public class CollegeStu : Student
    {
        private double chinese;
        private double math;
        private double english;
        public double Chinese
        {
            get { return chinese; }
            set { chinese = value; }
        }
        public double Math
        {
            get { return math; }
            set { math = value; }
        }
        public double English
        {
            get { return english; }
            set { english = value; }
        }
        public CollegeStu(string Myname, int Myage, double MyChinese, double MyMath, double MyEnglish) : base(Myname, Myage)
        {
            this.chinese = MyChinese;
            this.math = MyMath;
            this.english = MyEnglish;

        }
        public override double GetAverage()
        {
            return (chinese + math + english) / 3;
        }
    }
}
